// dlg.txt

//	mark_quest_dest(zone,x,y,layer,quest);
//	cancel_out_fight(0,short kill_enc)
//	make_outdoor_enc(short x,short y,short which_enc);
//	set_out_fight_field(short which_field);

begintalkscript;

variables;

short this_sec = 67;

begintalknode;
	tag = 1;
	condition = get_sdf(100 + this_sec,1) == 0;
	text1 = "The road to the east leads to a hundred miles of largely unclaimed land. Mostly wastes, but there are probably a few decent patches that haven't been settled. On the other side is Dyandia, one of the minor vassals of Haven.";
	text2 = "An enormous landslide has blocked the pass. You could probably get through, with effort. However, it will take months of work to properly clear the road. Work that has not even begun.";
	text3 = "It is unfortunate (and suspicious) that this road has been blocked now. Nothing to be done about it at this point.";
	code =
		sf(100 + this_sec,1,1);
	break;
	
begintalknode;
	tag = 2;
	condition = get_sdf(100 + this_sec,2) == 0;
	text1 = "You find an abandoned campsite. Whoever stayed here last did a careful job cleaning up after themselves. You aren't sure if anyone has been here recently.";
	text2 = "You look for signs of Jaxon Scar's band. You find nothing.";
	text3 = "As you leave, you hear a distant horn blow.";
	code =
		sf(100 + this_sec,2,1);
		if (gf(31,24) != 2)
			rs(2);
		if ((gf(167,2) == 0) || (gf(167,3) == 0) || (gf(167,4) == 0)) 
			rs(3);
			else make_outdoor_enc(361,314,1);
	break;

begintalknode;
	tag = 3;
	condition = get_sdf(100 + this_sec,3) == 0;
	text1 = "You find an abandoned campsite. Whoever stayed here last did a careful job cleaning up after themselves. You aren't sure if anyone has been here recently.";
	text2 = "You look for signs of Jaxon Scar's band. You find nothing.";
	text3 = "As you leave, you hear a distant horn blow.";
	code =
		sf(100 + this_sec,3,1);
		if (gf(31,24) != 2)
			rs(2);
		if ((gf(167,2) == 0) || (gf(167,3) == 0) || (gf(167,4) == 0)) 
			rs(3);
			else make_outdoor_enc(361,314,1);
	break;

begintalknode;
	tag = 4;
	condition = get_sdf(100 + this_sec,4) == 0;
	text1 = "You find an abandoned campsite. Whoever stayed here last did a careful job cleaning up after themselves. You aren't sure if anyone has been here recently.";
	text2 = "You look for signs of Jaxon Scar's band. You find nothing.";
	text3 = "As you leave, you hear a distant horn blow.";
	code =
		sf(100 + this_sec,4,1);
		if (gf(31,24) != 2)
			rs(2);
		if ((gf(167,2) == 0) || (gf(167,3) == 0) || (gf(167,4) == 0)) 
			rs(3);
			else make_outdoor_enc(361,314,1);
	break;

begintalknode;
	tag = 5;
	condition = get_sdf(100 + this_sec,5) == 0;
	text1 = "__";
	code =
		sf(100 + this_sec,5,1);
	break;

begintalknode;
	tag = 6;
	condition = get_sdf(100 + this_sec,6) == 0;
	text1 = "__";
	code =
		sf(100 + this_sec,6,1);
	break;

begintalknode;
	tag = 7;
	condition = get_sdf(100 + this_sec,7) == 0;
	text1 = "__";
	code =
		sf(100 + this_sec,7,1);
	break;

begintalknode;
	tag = 8;
	condition = get_sdf(100 + this_sec,8) == 0;
	text1 = "__";
	code =
		sf(100 + this_sec,8,1);
	break;

begintalknode;
	tag = 9;
	condition = get_sdf(100 + this_sec,9) == 0;
	text1 = "__";
	code =
		sf(100 + this_sec,9,1);
	break;

begintalknode;
	tag = 10;
	condition = get_sdf(100 + this_sec,10) == 0;
	text1 = "__";
	code =
		sf(100 + this_sec,10,1);
	break;

begintalknode;
	tag = 11;
	condition = get_sdf(100 + this_sec,11) == 0;
	text1 = "__";
	code =
		sf(100 + this_sec,11,1);
	break;

begintalknode;
	tag = 12;
	condition = get_sdf(100 + this_sec,12) == 0;
	text1 = "__";
	code =
		sf(100 + this_sec,12,1);
	break;

// MIXED

begintalknode;
	tag = 13;
	condition = 1;
	text1 = "Jaxon Scar and his brigands will no longer torment the clans of the Ro. In their bags, you find a variety of tradable goods. It has been a profitable day.";
	code =
		change_coins(93,TRUE);
	break;
	
begintalknode;
	tag = 14;
	condition = 1;
	text1 = "The warped ka-boars have been slain. You expect a reward from the Erudico, but they are too angry with you to speak. They stalk over the desert.";
	text2 = "You search the cave of the ka-boars. It is a deep, slimy hole, and the smell makes you gag. You find some nice crystals and an old bone scroll tube.";
	code =
		change_coins(43,TRUE);
		reward_give(406);
	break;

begintalknode;
	tag = 15;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 16;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 17;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 18;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 19;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 20;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 21;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 22;
	condition = 1;
	text1 = "__";

////

begintalknode;
	tag = 30;
	state = -1;
	nextstate = 10;
	condition = 1;
	question = "Name";
	text1 = "At the end of this valley, you find several sages of the Erudico. They are wearing the heavy robes of their sect, but the mountain shades them. They are gathered around a cave entrance.";
	text2 = "When you get close, they see you. They turn around and run toward you, shouting.";
	code =
		sf(167,13,1);
	break;
	
begintalknode;
	state = 10;
	nextstate = 11;
	condition = 1;
	question = "_Hello._";
	text1 = "They run toward you, waving their arms. _Go away!_ _Go away!_ _This is a private experiment!_ _These are the secrets of the Erudico!_ They are very angry.";
	text2 = "They haven't noticed the huge beasts that have come out of the cave behind them.";

begintalknode;
	state = 11;
	nextstate = 12;
	condition = 1;
	question = "_Umm ..._";
	text1 = "_Don't you know? This is Erudico land! There is a ruin near here. We are extracting its knowledge! It is a very private process!_";
	text2 = "The beasts are huge, glowing ka-boars. They lumber toward you.";

begintalknode;
	state = 12;
	nextstate = 13;
	condition = 1;
	question = "_Look behind you._";
	text1 = "_What trickery of Haven is this? You steal our secrets, and then you insult us! What are we supposed to see if we look behind us?_";
	text2 = "The ka-boars are very close.";

begintalknode;
	state = 13;
	nextstate = -1;
	condition = 1;
	question = "_Monsters._";
	text1 = "They finally bother to listen to you, just in time to jump out of the way of a ka-boar's crushing blow. _You see, Haven? You ruined our experiment! Now we have to clean it up!_";
	action = END_TALK;
	code =
		cancel_out_fight(1,1);
		make_outdoor_enc(380,314,0);	
	break;
	
//

begintalknode;
	tag = 40;
	state = -1;
	nextstate = 40;
	condition = 1;
	question = "Name";
	text1 = "You have been seen by a band of Dhagan warriors. They run over the hills toward you at great speed, and neither the heat nor their armor slows them down.";
	text2 = "At first, you are sure that they are going to attack you. Then they get close enough to see who you are. _Haven? It is Haven,_ they whisper among themselves.";
	text3 = "Their leader approaches to face you. He removes his helmet to reveal a brutal man of the Dhaga. He is probably in his thirties. You note that he has two vicious scars, each running down the sides of his face.";
	code =
		sf(171,12,1);
	break;
	
begintalknode;
	state = 40;
	nextstate = 41;
	condition = 1;
	question = "_Yes?_";
	text1 = "The scarred man thinks for a moment. _We are warriors. We saw you. We thought you might be prey. Now I am close. I see you are guests of the land. We want no trouble. We will just go._";

begintalknode;
	state = 41;
	nextstate = -1;
	condition = 1;
	question = "_You are raiders?_";
	text1 = "_Yes, in the way of Dhagan tradition. We follow the ways of the Ro. We ask to leave in peace._";

begintalknode;
	state = 41;
	nextstate = -1;
	condition = 1;
	question = "_What is your name?_";
	text1 = "_I choose not to say. We have many enemies._";

begintalknode;
	state = 41;
	nextstate = -1;
	condition = gf(31,24) == 2;
	question = "_Is your name Jaxon Scar, by any chance?_";
	text1 = "The raiders all look at each other. Their leader lets out a long sigh. _I just wanted to let you go. Now that you have seen me, you have to die. This will cause a lot of problems with Haven, but, really, you are the one to blame._";
	text2 = "They attack.";
	action = END_TALK;
	
begintalknode;
	state = 41;
	nextstate = -1;
	condition = 1;
	question = "_You are raiders. That violates the laws of Haven. I should probably kill you, just to be safe._";
	text1 = "Their leader lets out a long sigh. _Well, this is some bad luck for Jaxon Scar. Die, or cause many problems with Haven. But you made your choice!_ They draw their blades.";
	action = END_TALK;

begintalknode;
	state = 41;
	nextstate = -1;
	condition = 1;
	question = "_All right. You can go._";
	text1 = "The scarred man smiles. _The wisest choice. Best for all of us. As quickly as they came, the raiders disappear into the hills._";
	action = END_TALK;
	code =
		cancel_out_fight(0,1);
	break;
	

	
//

begintalknode;
	tag = 70;
	state = -1;
	nextstate = 70;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";


//

begintalknode;
	tag = 100;
	state = -1;
	nextstate = 100;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 100;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

//

begintalknode;
	tag = 130;
	state = -1;
	nextstate = 130;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 130;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

//

begintalknode;
	tag = 160;
	state = -1;
	nextstate = 160;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 160;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";
		
//

begintalknode;
	tag = 190;
	state = -1;
	nextstate = 190;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 190;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";
				